package com.caregiver.watch.business.device.controller;

import com.caregiver.watch.business.device.model.dto.EnableRealTimeLocationParam;
import com.caregiver.watch.business.device.service.DeviceService;
import com.caregiver.watch.common.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 设备控制器
 * @Author 疆戟
 * @Date 2025/10/12 15:30
 * @Version 1.0
 */
@Tag(name  = "DeviceController", description = "设备服务")
@Slf4j
@RestController
@RequestMapping("device")
public class DeviceController {


    @Autowired
    private DeviceService deviceService;

    // 开启手表实施定位
    @Operation(summary = "触发手表实施定位")
    @PostMapping("triggerRealTimeLocation")
    public R<Boolean> triggerRealTimeLocation(@RequestBody EnableRealTimeLocationParam param) {
        return R.ok(deviceService.triggerRealTimeLocation(param));
    }

}
